package com.victor.service;


import java.util.List;

import com.github.pagehelper.PageInfo;
import com.victor.entity.city.CityIntroduce;
import com.victor.entity.city.CityIntroducePhoto;
import com.victor.entity.collection.Collections;
import com.victor.entity.praise.CityPraise;

public interface CityService {
	/**
	 * 查询全部城市 筛选省份  搜索
	 * @param search
	 * @param page
	 * @param row
	 * @param province
	 * @return
	 */
	PageInfo<CityIntroduce> selAll(String search, int page, int row, String province);
	/**
	 * 添加城市
	 * @param cityIntroduce
	 * @return
	 */
	boolean insertCity(CityIntroduce cityIntroduce);
	/**
	 * 根据城市id查询
	 * @param id
	 * @return
	 */
	CityIntroduce selCityById(String id,String uid);
	/**
	 * 修改城市
	 * @param city
	 * @return
	 */
	boolean updateCity(CityIntroduce city);
	/**
	 * 删除城市
	 * @param ids
	 * @return
	 */
	boolean delCity(int[] ids);
	/**
	 * 删除评论
	 * @param id
	 * @return
	 */
	boolean delComments(String id);
	/**
	 * 删除城市图片
	 * @param gid
	 * @return
	 */
	boolean delPhoto(Integer cid);
	/**
	 * 添加图组图片
	 * @param cityIntroducePhoto
	 * @return
	 */
	boolean insertPhoto(CityIntroducePhoto cityIntroducePhoto);
	/**
	 * 根据type 和pid查询是否收藏
	 * @param uid 
	 * @param collections
	 * @return
	 */
	Collections selCollectionsByPidAndType(String pid, String uid);
	/**
	 * 添加城市收藏
	 * @param collections
	 * @return
	 */
	boolean insertCollection(Collections collections);
	/**
	 * 删除收藏
	 * @param id
	 * @return
	 */
	boolean delCollectios(Integer id);
	/**
	 * 根据城市id查询点赞表
	 * @param cityid
	 * @param uid 
	 * @return
	 */
	CityPraise selCityPraiseByCityID(String cityid, String uid);
	/**
	 * 添加城市点赞
	 * @param cityPraise
	 * @return
	 */
	boolean insertCityPraise(CityPraise cityPraise);
	/**
	 * 删除城市点赞
	 * @param id
	 * @return
	 */
	boolean delCityPraise(Integer id);
	/**
	 * 查询城市点赞数
	 * @param cityid
	 * @return
	 */
	String selCityPraiseCount(String cityid);
	/**
	 * 修改转发数
	 * @param cityid
	 * @return
	 */
	boolean updateForwardCount(String cityid);
	/**
	 * 是否收藏
	 * @param collections
	 * @return
	 */
	List<Collections> selIfCollections(Collections collections);
	/**
	 * 根据名称查询
	 * @param city
	 * @return
	 */
	CityIntroduce selCityByName(String city);
	

}
